package thread.basepackage.t12;

import java.util.Random;

/**
 * Created by cuihao on 2017/11/29.
 */
public class Thread1 extends Thread {

    @Override
    public void run() {
        long begionTime = System.currentTimeMillis();
        long result = 0;
        for (int i = 0; i < 500000; i++) {
            Random random = new Random();
            random.nextInt();
            result = result + i;

        }
        long endTime = System.currentTimeMillis();
        System.out.println("############################ thread1 use time = " + (endTime - begionTime));
    }

}

